import axios from '@/libs/api.request'
import platform from '@/config/platform'
/**
 * @param { 配额管理 }
 */

// 配额创建
export const quotaCreate = data => {
        return axios.request({
            url: platform.BOOKING_WWX + '/org-quota/init',
            method: 'post',
            data
        })
    }
    // 配额管理-每日通行单配额管理
export const quotaManagement = data => {
        return axios.request({
            url: platform.BOOKING_WWX + '/org-quota/orgQuotaManage',
            method: 'post',
            data
        })
    }
    // 配额管理-通行单配额模式
export const quotaModel = data => {
        return axios.request({
            url: platform.BOOKING_WWX + '/org-quota/orgQuotaModelManage',
            method: 'post',
            data
        })
    }
    // 配额管理-停车位管理
export const carPlay = data => {
        return axios.request({
            url: platform.BOOKING_WWX + '/org-quota/parkingpacesNumber',
            method: 'post',
            data
        })
    }
    // 组织预警阈值
export const threshold = data => {
        return axios.request({
            url: platform.BOOKING_WWX + '/org-alert-threshold',
            method: 'post',
            data
        })
    }
    // 通行检查站
export const checkPoint = data => {
        return axios.request({
            url: platform.BOOKING_WWX + '/org-area',
            method: 'post',
            data
        })
    }
    // 查询关联检查站
export const getRelatedStation = params => {
        return axios.request({
            url: platform.BOOKING_WWX + `/org-area/areaList`,
            method: 'get',
            params

        })
    }
    // 查询事由列表
export const getReasonList = params => {
        return axios.request({
            url: platform.BOOKING_WWX + `/incident-origin/list`,
            method: 'get',
            params
        })
    }
    // 查询停车场列表
export const getParkingList = params => {
        return axios.request({
            url: platform.BOOKING_WWX + `/parking-lot/list`,
            method: 'get',
            params
        })
    }
    // 查询通行单设置下-审核组织
export const getExamineList = params => {
        return axios.request({
            url: platform.BOOKING_WWX + `/org/all-tree`,
            method: 'get',
            params
        })
    }
    // 保存通行单管理
export const saveTicket = (data, progre) => {
    return axios.request({
        url: platform.BOOKING_WWX + `/passTicketSetting/save`,
        method: 'post',
        data,
        onUploadProgress: progre
    })
}

// 回显通行单管理
export const lookTickets = params => {
    return axios.request({
        url: platform.BOOKING_WWX + `/passTicketSetting/findByOrgId`,
        method: 'get',
        params

    })
}

// 根据检查站查找所属部门
export const findId = params => {
    return axios.request({
        url: platform.BOOKING_WWX + `/area/findById`,
        method: 'get',
        params
    })
}

// 获取车辆类别接口
export const getCarTypeList = params => {
    return axios.request({
        url: platform.BOOKING_WWX + `/booking-car/type/list`,
        method: 'get',
        params
    })
}

// 获取审核人组织树
export const getExaminePeople = params => {
    return axios.request({
        url: platform.BOOKING_WWX + `/org/org-user-tree`,
        method: 'get',
        params
    })
}